#ifndef WIDGET_H
#define WIDGET_H


 #include <QHttp>
 #include <QWidget>
 #include <QMenu>
 #include <QSoftMenuBar>
 #include <QBuffer>
 #include <QXmlStreamReader>
 #include <QDomDocument>
 #include "newsbrowser.h"

 class QLineEdit;
 class QListWidget;
 class QListWidgetItem;
 class QPushButton;

 class RSSListing : public QWidget
 {
     Q_OBJECT
 public:
     RSSListing(QWidget *widget = 0, Qt::WindowFlags wf = 0);

 public slots:
     void fetch();
     void finished(int id, bool error);
     void readData(const QHttpResponseHeader &);
     void itemActivated(QListWidgetItem * item);
     void showAbout();
     void showAboutQt();

 private:
     void parseXml();

     QXmlStreamReader xml;
     QString currentTag;
     QString desString;
     QString titleString;
     QString textString;
     QString catString;
     QString dateString;

     QHttp http;
     int connectionId;

     QDomDocument doc;
     QLineEdit *lineEdit;
     QMenu*	mainMenu;
     QAction*   about;
     QListWidget *listWidget;
     QPushButton *abortButton;
     QPushButton *fetchButton;

     newsbrowser newsBrowser;
 };

#endif // WIDGET_H
